﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;

namespace Clientes
{
    class Conexao
    {
        OleDbConnection connection = new OleDbConnection();
        public  Conexao()
        {

        }

        public OleDbConnection getConexao()
        {
            connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @"C:\Users\Mairton\Documents\Visual Studio 2010\Projects\Clientes\Clientes\Clientes.accdb";

            connection.Open();

            return connection;
        }

        public void closeConexao()
        {
            connection.Close();
        }
        public void openConexao()
        {
            closeConexao();
            connection.Open();
        }
    }
}
